package com.djx.ack.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @ClassName SendController
 * @Date 2021-07-29 17:11
 * @Author Administrator
 * @Description TODO
 * Version 1.0
 */
@RestController
@RequestMapping("/mq")
public class SendController {

    @Autowired
    public RabbitTemplate rabbitTemplate;
    @RequestMapping("/send")
    public  void send(String a ){
        rabbitTemplate.convertAndSend("ACK_EXCHANGE","ackA",a);
        System.out.println("OK");
    }

}
